package com.rui.study.commons.study.aop;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SpringProxyUtil {

    private static final Logger LOGGER = LoggerFactory.getLogger(SpringProxyUtil.class);


    private SpringProxyUtil() {
    }

//    public static  <T> T getProxy(Class<T> clazz, final Object targetObject) {
//
//        return ProxyFactory.getProxy(clazz, new MethodInterceptor() {
//            @Override
//            public Object invoke(MethodInvocation invocation) throws Throwable {
//                Method method = invocation.getMethod();
//                Object[] args = invocation.getArguments();
//                LOGGER.info("Intercepter run...");
//                return method.invoke(targetObject, args);
//            }
//        });
//    }
//
//    public static Object getProxy(TargetSource targetSource) {
//        return ProxyFactory.getProxy(targetSource);
//    }

}
